home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / DynRisk 68k 4.01 demo.sit / DynRisk-Help.rsrc / TEXT_4625.txt < prev    next >
Text File  |  1996-08-30  |  1KB  |  17 lines

  1. In the 窶廣ppl.窶 field you enter the name of the AppleScript applet containing the subroutine you want to call from the AppleScript event. Be sure that this applet is running before you attempt to call it from DynRisk.
  2.  
  3. In the 窶彜ubr.窶 field you enter the name of the subroutine you want to call.
  4.  
  5. Note that to be able to call a subroutine, its name cannot contain any capital letters!
  6.  
  7. Thus, you cannot call a subroutine whose called 窶廴yFamousRoutine窶. The reason for this strange limitation is probably only known by Apple Computers.
  8.  
  9. As a very simple example, consider the following AppleScript subroutine:
  10.  
  11. on mysub(x)
  12.     return 2 * x + 7
  13. end mysub
  14.  
  15. To access this from an AppleScript event, you enter the name of the subroutine, i.e., 窶徇ysub窶 into the 窶彜ubr.窶 field.
  16.  
  17. If during a simulation, the event gets an input value of e.g., 4, this value is passed as an argument to the mysub subroutine, which returns 2*4 + 7 =15. Assuming that the 窶廢xpect script reply窶 option was checked, the value 15 will eventually be passed on to the successors of the event.